class UserloginController < ApplicationController

  def signin
    
  end

  def login
    @user = User.new
    @user.name = params[:name]
    @user.password = params[:password]
  end

  def process_login
      if user = User.authenticate(params[:user])
        session[:id] = user.id # Remember the user's id during this session
        redirect_to session[:return_to] || '/'
      else
        flash[:error] = 'Invalid login.'
        redirect_to :action => 'login', :name => params[:user][:name]
      end
    end

    def logout
      reset_session
      flash[:message] = 'Logged out.'
      redirect_to :action => 'login'
    end

    def my_account
    end

end
